package com.asc.service.user.controller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.asc.service.user.entity.NavigateEXT;
import com.asc.service.user.service.NavigateService;
import com.asc.utils.HTMLUtil;
import com.asc.utils.ResultWrap;

/**
 * 后台权限管理
 * @author xx
 * */
@RestController
@RequestMapping("/navigate")
public class NavigationAction {
	
	@Autowired
	private NavigateService navigateService;

	@RequestMapping("/queryNavigate")
	public void queryNavigate(HttpServletRequest request,HttpServletResponse response) {
		Map<String, Object> requestMap = HTMLUtil.getPageParams(request);
		ResultWrap resultWrap = HTMLUtil.getDefaultWrap();
		List<NavigateEXT> navigates = navigateService.queryNavigate(requestMap);
		resultWrap.setData(navigates);
		HTMLUtil.sendWrap(response, resultWrap, request);
	}
}
